package io;

import java.io.Serializable;
import java.util.Arrays;

//创建一个自定义的实体类
public class Person implements Serializable {
    String name;

    int age;

    String gender;

    String [] ontherInfo;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String[] getOntherInfo() {
        return ontherInfo;
    }

    public void setOntherInfo(String[] ontherInfo) {
        this.ontherInfo = ontherInfo;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", gender='" + gender + '\'' +
                ", ontherInfo=" + Arrays.toString(ontherInfo) +
                '}';
    }

    public Person(int age, String gender, String name, String[] ontherInfo) {
        this.age = age;
        this.gender = gender;
        this.name = name;
        this.ontherInfo = ontherInfo;
    }
}
